<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
	<title>Selezione istanze modifica pacchetto</title>
	<link rel="stylesheet" type="text/css" href="../styles/style.css" />
</h:head>
<h:body>
<div id="container">
<div id="box">

<header class="banner">
<span id="titoloPagina"> Scegli le istanze da aggiungere al pacchetto </span>
</header>

<div id="externalborder1">
<p:spacer height="40px" />


<h:form id="form"> 
      
      <p:growl id="growl" showDetail="true" sticky="true" />
	<div id="externalborderTab"> 
		<p:dataTable id="istanzeSel" var="istanzaDTO" rowKey="#{istanzaDTO.idIstanza}" value="#{creazionePacchetto.listaIstanze}" paginator="true" rows="7" 
                 selection="#{creazionePacchetto.istanzaTmp}" selectionMode="single" sortMode="multiple" style="text-align:center;" >  
  
  
   		
			<p:ajax event="rowSelect" update=":form:growl" listener="#{creazionePacchetto.onRowSelectIstanza}"/>

   		
		    <p:column id="tipo" sortBy="elemento.tipo" headerText="Tipologia elemento">  
	            <h:outputText value="#{istanzaDTO.elemento.tipo}" />  
	        </p:column> 
	        
	         <p:column id="nome" sortBy="elemento.nome" headerText="Nome">  
	            <h:outputText value="#{istanzaDTO.elemento.nome}" />  
	        </p:column>
	        
	        <p:column id="dataInizio" sortBy="dataInizio" headerText="Data di inizio">  
	            <h:outputText value="#{istanzaDTO.dataInizio}">  
                <f:convertDateTime pattern="dd/MM/yyyy HH:mm" />      
            </h:outputText>    
	        </p:column>  
	   
  
	        <p:column id="dataFine" sortBy="dataFine" headerText="Data di fine">  
	            <h:outputText value="#{istanzaDTO.dataFine}" >  
                <f:convertDateTime pattern="dd/MM/yyyy HH:mm" />      
            </h:outputText>    
	        </p:column>  
	  
	      
	        <p:column id="disponibilita" sortBy="disponibilita" headerText="Disponiblità">  
	            <h:outputText value="#{istanzaDTO.disponibilita}" />  
	        </p:column>  
	           
	        <p:column id="prezzo" sortBy="prezzo" headerText="Prezzo">  
	            <h:outputText value="#{istanzaDTO.prezzo}" />  
	        </p:column>
	        
	         <p:column id="citta" sortBy="elemento.città" headerText="Citta">  
	            <h:outputText value="#{istanzaDTO.elemento.città}" />  
	        </p:column> 
	       
	      
	        
	        <p:column id="multy" sortBy="elemento.multy" headerText="Info aggiuntive">  
	            <h:outputText value="#{istanzaDTO.elemento.multy}" />  
	        </p:column> 
	        
	    
	        
	    </p:dataTable>
    </div>
    
 </h:form>  
 
     	     <p:spacer height="40px"/>
<h:form>

 <div id="columnBox" style="margin:0px auto; width:70%">
	
	<div id="column1" style="float:left; margin:0; margin-left:107px/*111.5px*/;">
<a id="registerlink" href="modificaPacchetto.xhtml">
					<div class = "button" id = "indietro">
						Indietro
					</div>
				</a>
</div>

<div id="column2" style="float:left; margin:0;/*margin-left:111.5px*/;">
<div class="padder" id="padder">
</div>
</div>

<div id="column3" style="float:left; margin:0;/*margin-left:111.5px*/;">
	<div id="registerButton">
<h:commandLink id="registerlink" action="#{creazionePacchetto.clearPacchettoMod()}">
<div class="button" id="register">
Riepilogo
</div>
</h:commandLink>
</div>

				</div>
				</div>

<!-- 
<div id="centerbutton">
<h:commandLink id="registerlink" action="#{creazionePacchetto.clearPacchettoMod()}">
<div class="button" id="register">
Riepilogo
</div>
</h:commandLink>
</div>-->
</h:form> 
 
  
 </div>
</div>
 <div id="push">
</div>
</div>

<div id="footer">
<h:button id="homepage" value="Homepage" outcome="index.xhtml"></h:button>
</div>

</h:body>   

    
</html>